package com.droidwatcher.retrofit;

import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2018/3/20.
 */

public class Result<T> {
    @SerializedName("data")
    @JSONField(name = "data")
    public T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @SerializedName("meta")
    @JSONField(name = "meta")

    public Meta meta ;

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    @Override
    public String toString() {
        return "Result{" +
                "data=" + data +
                ", meta=" + meta +
                '}';
    }

    public class Meta{
        @SerializedName("code")
        @JSONField(name = "code")
        private String code ;
        @SerializedName("message")
        @JSONField(name = "message")
        private String message;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        @Override
        public String toString() {
            return "Meta{" +
                    "code='" + code + '\'' +
                    ", message='" + message + '\'' +
                    '}';
        }
    }
}
